<?php
include("ssl.class.php");

$clients = array();
$socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
socket_bind($socket,'127.0.0.1',1028);
socket_listen($socket);
//socket_set_nonblock($socket);
//while(true)
//{
    if(($newc = @socket_accept($socket)) !== false)
    {
        $content = socket_read($newc,2048);
        $ssl_client = new ssl_client_hello($content);
        $ssl_server = new ssl_server_hello();
        socket_write($newc, $ssl_server->setServerHello());
    }
//}

?>
